import request from '@/utils/request'
import linq from 'linq'
export async function getJxgl(XXID,CJPC){
    //
    
    let res =  await request({
        url: `/Jxgls?$filter=XXID eq '${XXID}' and CJPC eq '${CJPC}'`,
        method: 'get',
      })
      
    return res.data.value;
    //
    
}
export async function bulkAddJxgl(data){
    //
    
    let res =  await request({
        url: '/Jxgls/BulkAddJxgl',
        method: 'post',
        data:data
      })
    return res.data.value;
    //
    
  }
export async function updateJxgl(model){
    let res =  await request({
        url: `/Jxgls(${model.ID})`,
        method: 'put',
        data: model
      })
      
      return res.data;
}
export async function deleteJxgl(model){
   
  
    let res = await  request({
        url: `/Jxgls/${model.ID}`,
        method: 'delete',
      })
      
      return res.data;
}
export async function addJxgl(model){
   
   
    let res =  await request({
      url: '/Jxgls',
      method: 'post',
      data: model,
    })
    
    return res.data;
}